home *** CD-ROM | disk | FTP | other *** search
/ Java Primer Plus / Java Primer Plus (Waite Group Proess)(1996).iso / java_Win / demo / ImageMap / SoundArea.class (.txt) < prev   
Encoding:
Java Class File  |  1995-10-12  |  1.0 KB  |  22 lines

  1. import java.awt.Graphics;
  2.  
  3. class SoundArea extends ImageMapArea {
  4.    String sound;
  5.  
  6.    public void handleArg(String arg) {
  7.       this.sound = arg;
  8.       super.terminal = false;
  9.    }
  10.  
  11.    public void highlight(Graphics g, boolean on) {
  12.       if (on && !super.active) {
  13.          super.parent.play(super.parent.getDocumentBase(), this.sound);
  14.       }
  15.  
  16.       super.highlight(g, on);
  17.    }
  18.  
  19.    public SoundArea() {
  20.    }
  21. }
  22.